/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 material_value.cpp

	$Header: /game/material_value.h $

	$NoKeywords: $
	
	t_material_values is a vector holding scaling values for each 
	material type.  This scaling value is used on a material value
	to calculate its actual value (to the ai player).

 ************************************************************************/

#include "precompiled.h"
#include "material_values.h"
#include "materials.h"

t_material_values::t_material_values() :
	t_material_float_array(1.0f)
{
}

t_material_array t_material_values::operator* ( t_material_array const& source ) const
{
	t_material_array dest;

	for (int i = 0; i < k_material_count; i++)
		dest[i] = source[i] * (*this)[i];

	return dest;
}

t_material_array& t_material_values::adjust_material_values( t_material_array& source ) const
{
	for (int i = 0; i < k_material_count; i++)
		source[i] *= (*this)[i];

	return source;
}
